<template>
  <div class="Mmaintenance">
    <el-container>
      <el-main>
        <h1>为什么有很多东西，总是在转身就轮回了</h1>
      </el-main>
      <el-footer>
        <div class="container">
          <div class="box">
            <div class="item">
              管理员：Admin
            </div>
            <div class="item">
              日期：{{date}}
            </div>
          </div>
        </div>
      </el-footer>
    </el-container>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  data() {
    return {
      date: "",
    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  created() {
    const d = new Date();
    let str = '';
    str += d.getFullYear() + '年'; //获取当前年份 
    str += d.getMonth() + 1 + '月'; //获取当前月份（0——11） 
    str += d.getDate() + '日';
    this.date = str;
  }
}
</script>

<style lang="scss" scoped>
.Mmaintenance {
  h1 {
    font-family: "plantc", "Source Han Serif", serif;
    font-size: 50px;
    text-align: center;
    padding: 130px 0;
  }
  .container {
    display: flex;
    justify-content: flex-end;
    .box {
      width: 300px;
      font-size: 20px;
      .item {
        padding: 10px 0;
      }
    }
  }
}
</style>
